/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Modele;

/**
 *
 * @author sio
 */
public class Medecin implements Comparable<Medecin>{
    private String id;
    private String nom;
    private String prenom;
    private String adresse;
    private String tel;
    private String spe;
    
    public Medecin(String id, String nom, String prenom, String adresse, String tel, String spe){
        this.id=id;
        this.nom=nom;
        this.prenom=prenom;
        this.adresse=adresse;
        this.tel=tel;
        this.spe=spe;
    }
    
    public String getNom(){
        return this.nom;
    }
    public String getPrenom(){
        return this.prenom;
    }
    public String getAdresse(){
        return this.adresse;
    }
    public String getTel(){
        return this.tel;
    }
    public String getSpe(){
        return this.spe;
    }

    @Override
    public int compareTo(Medecin o) {
        if(this.nom.compareTo(o.nom)==0){
            if(this.prenom.compareTo(o.prenom)==0){
                return this.id.compareTo(o.id);
            }else{
                return this.prenom.compareTo(o.prenom);
            }
        }else{
            return this.nom.compareTo(o.nom);
        }
    }
}
